class CreateOrderExaminations < ActiveRecord::Migration
  def self.up
    create_table :order_examinations do |t|
      t.integer :examination_type_id
      t.integer :patient_data_id
      t.boolean  :has_resoult,  :default => false, :null => false
      t.boolean  :is_checked,  :default => false, :null => false
      t.integer :user_id
      t.integer :checking_user_id
      t.integer :executing_user_id
      t.timestamps
    end

    OrderExamination.create :examination_type_id => 1,
                            :patient_data_id => 1, :user_id =>1

    OrderExamination.create :examination_type_id => 2,
                            :patient_data_id => 1, :user_id =>1

  end

  def self.down
    drop_table :order_examinations
  end
end
